var siteHost = '';
$(document).ready(function () {
    console.log('页面加载完成');
    getUser();
});

function getUser() {
    $.ajax({
        type: "GET",
        url: siteHost + "/demo/getUser",
        data: {},
        dataType: "json",
        success: function (data) {
            console.log(data.name);
        }
    });
}